import request from '@/utils/request'
// 文章分类列表
export function getClassifyList(query) {
  return request({
    url: '/rest/blog/classify/list',
    method: 'post',
    data: query
  })
}
// 新增文章分类
export function postAddClassify(query) {
  return request({
    url: '/rest/blog/classify/add',
    method: 'post',
    data: query
  })
}
// 刪除文章分类
export function postDeleteClassify(query) {
  return request({
    url: '/rest/blog/classify/delete',
    method: 'post',
    data: query
  })
}
// 文章标签列表
export function getTagList(query) {
  return request({
    url: '/rest/blog/tag/list',
    method: 'post',
    data: query
  })
}
// 新增文章标签
export function postAddTag(query) {
  return request({
    url: '/rest/blog/tag/add',
    method: 'post',
    data: query
  })
}
// 获取单个文章标签
export function getTagById(query) {
  return request({
    url: '/rest/blog/tag/findOne',
    method: 'post',
    data: query
  })
}
// 修改单个文章标签
export function postUpdateTag(query) {
  return request({
    url: '/rest/blog/tag/update',
    method: 'post',
    data: query
  })
}
// 刪除文章标签
export function postDeleteTag(query) {
  return request({
    url: '/rest/blog/tag/delete',
    method: 'post',
    data: query
  })
}
// 获取单个文章分类
export function getClassifyById(query) {
  return request({
    url: `/rest/blog/classify/findOne`,
    method: 'post',
    data: query
  })
}
// 修改文章分类
export function postUpdateClassify(query) {
  return request({
    url: `/rest/blog/classify/update`,
    method: 'post',
    data: query
  })
}

// 文章列表
export function getEsssayList(query) {
  return request({
    url: '/rest/blog/essay/list',
    method: 'post',
    data: query
  })
}
// 新增文章
export function postAddBlog(query) {
  return request({
    url: '/rest/blog/essay/add',
    method: 'post',
    data: query
  })
}
// 删除文章
export function postDeleteEssay(query) {
  return request({
    url: '/rest/blog/essay/delete',
    method: 'post',
    data: query
  })
}

// 获取单个文章
export function getEssayById(query) {
  return request({
    url: `/rest/blog/essay/findOne`,
    method: 'post',
    data: query
  })
}

// 获取单个文章
export function postUpdateEssay(query) {
  return request({
    url: `/rest/blog/essay/update`,
    method: 'post',
    data: query
  })
}
